package com.example.config.reciver;

import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
public class FanoutReceiver {
    @RabbitListener(queues = "fanoutQueue1")
    @RabbitHandler
    public void comsumeFanoutQueue1(String msg){
        System.out.println("fanoutReceiver1接受到消息了" + msg);
    }

    @RabbitListener(queues = "fanoutQueue2")
    @RabbitHandler
    public void comsumeFanoutQueue2(String msg){
        System.out.println("fanoutReceiver2接受到消息了" + msg);
    }

    @RabbitListener(queues = "fanoutQueue3")
    @RabbitHandler
    public void comsumeFanoutQueue3(String msg){
        System.out.println("fanoutReceiver3接受到消息了" + msg);
    }
}
